Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fairseq model #3500

Closed
wants to merge 1 commit into from
Closed

fix: fairseq model #3500

wants to merge 1 commit into from

Conversation

AntonyZ89
Copy link

@AntonyZ89 AntonyZ89 commented Jan 7, 2024

Fix error when using fairseq model. The dataset and model aren't being defined and throw an error:

Sample:

from TTS.api import TTS

# TTS with on the fly voice conversion
api = TTS("tts_models/eng/fairseq/vits").to("cpu")
api.tts_with_vc_to_file(
    "Things that are fixed with great speed, but as a result, it's probably not going to work very well.",
    speaker_wav="target/speaker.wav",
    file_path="output.wav"
)

error:

Traceback (most recent call last):
  File "/var/www/python/coquitts-poc/./fairseq.py", line 13, in <module>
    tts = TTS(model_name="tts_models/eng/fairseq/vits").to("cpu")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/www/python/coquitts-poc/TTS/TTS/api.py", line 74, in __init__
    self.load_tts_model_by_name(model_name, gpu)
  File "/var/www/python/coquitts-poc/TTS/TTS/api.py", line 171, in load_tts_model_by_name
    model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name(
                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/www/python/coquitts-poc/TTS/TTS/api.py", line 129, in download_model_by_name
    model_path, config_path, model_item = self.manager.download_model(model_name)
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/www/python/coquitts-poc/TTS/TTS/utils/manage.py", line 388, in download_model
    model_item, model_full_name, model, md5sum = self._set_model_item(model_name)
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/www/python/coquitts-poc/TTS/TTS/utils/manage.py", line 307, in _set_model_item
    model_full_name = f"{model_type}--{lang}--{dataset}--{model}"
                                               ^^^^^^^
UnboundLocalError: cannot access local variable 'dataset' where it is not associated with a value

fixes: #3142 #3361

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2024

CLA assistant check
All committers have signed the CLA.

@Binozo
Copy link

Binozo commented Feb 4, 2024

Should be merged asap

@magomar
Copy link

magomar commented Feb 12, 2024

Please @AntonyZ89 sign the Contributor License Agreement so that this pull request can be merged.

@AntonyZ89
Copy link
Author

Please @AntonyZ89 sign the Contributor License Agreement so that this pull request can be merged.

done!

@davidmartinrius
Copy link

I have created a fork of TTS, incorporating all the valid pending pull requests. You can find it at https://github.com/davidmartinrius/TTS/

Copy link

stale bot commented Apr 16, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

@stale stale bot added the wontfix This will not be worked on but feel free to help. label Apr 16, 2024
@AntonyZ89
Copy link
Author

bump

@eginhard
Copy link
Contributor

@AntonyZ89 This repository is not maintained anymore. You could use the coqui-tts package instead, which includes a similar fix.

@stale stale bot removed the wontfix This will not be worked on but feel free to help. label Apr 16, 2024
Copy link

stale bot commented May 24, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

@stale stale bot added the wontfix This will not be worked on but feel free to help. label May 24, 2024
@stale stale bot closed this Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on but feel free to help.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fairseq voice cloning
6 participants